<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
|	example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
|	http://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There area two reserved routes:
|
|	$route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
|	$route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router what URI segments to use if those provided
| in the URL cannot be matched to a valid route.
|
*/



// khach-hang
$route['admin/khach-hang'] = 'admin/admincp/index/$1';
$route['admin/khach-hang/(:num)'] = 'admin/admincp/index/$1';
$route['admin/khach-hang/sua-kh/(:num)'] = 'admin/admincp/edit/index/$1';
$route['admin/khach-hang/sua-kh'] = 'admin/admincp/updated/index/$1';

//chung-loai-sp
$route['admin/chung-loa-sp'] = 'admin/category/index/$1';
$route['admin/chung-loa-sp/them'] = 'admin/category/add/index/$1';
$route['admin/chung-loa-sp/xoa'] = 'admin/category/delete/index/$1';
$route['admin/chung-loa-sp/sua/(:num)'] = 'admin/category/edit/index/$1';

//San-pham
$route['admin/san-pham'] = 'admin/products/index/$1';
$route['admin/san-pham/them'] = 'admin/products/add/index/$1';
$route['admin/san-pham/xoa'] = 'admin/products/delete/index/$1';
$route['admin/products/sua-sp/(:num)'] = 'admin/products/edit/index/$1';
$route['admin/san-pham/(:num)'] = 'admin/products/index/$1';

// cong nghe
$route['admin/cong-nghe'] = 'admin/technology/index/$1';
$route['admin/cong-nghe/them'] = 'admin/technology/add/index/$1';
$route['admin/cong-nghe/xoa'] = 'admin/technology/delete/index/$1';
$route['admin/cong-nghe/sua/(:num)'] = 'admin/technology/edit/index/$1';


// xuat xu
$route['admin/xuat-xu'] = 'admin/origin/index/$1';
$route['admin/xuat-xu/them'] = 'admin/origin/add/index/$1';
$route['admin/xuat-xu/xoa'] = 'admin/origin/delete/index/$1';
$route['admin/xuat-xu/sua/(:num)'] = 'admin/origin/edit/index/$1';


// loai nuoc
$route['admin/loai-nuoc'] = 'admin/brand/index/$1';
$route['admin/loai-nuoc/them'] = 'admin/brand/add/index/$1';
$route['admin/loai-nuoc/xoa'] = 'admin/brand/delete/index/$1';
$route['admin/loai-nuoc/sua/(:num)'] = 'admin/brand/edit/index/$1';


// khoang gia
$route['admin/khoang-gia'] = 'admin/aboutprice/index/$1';
$route['admin/khoang-gia/them'] = 'admin/aboutprice/add/index/$1';
$route['admin/khoang-gia/xoa'] = 'admin/aboutprice/delete/index/$1';
$route['admin/khoang-gia/sua/(:num)'] = 'admin/aboutprice/edit/index/$1';


// cong xuat
$route['admin/cong-xuat'] = 'admin/capacity/index/$1';
$route['admin/cong-xuat/them'] = 'admin/capacity/add/index/$1';
$route['admin/cong-xuat/xoa'] = 'admin/capacity/delete/index/$1';
$route['admin/cong-xuat/sua/(:num)'] = 'admin/capacity/edit/index/$1';


// ho tro
$route['admin/ho-tro'] = 'admin/suport/index/$1';
$route['admin/ho-tro/them'] = 'admin/suport/add/index/$1';
$route['admin/ho-tro/sua/(:num)'] = 'admin/suport/edit/index/$1';
$route['admin/ho-tro/xoa'] = 'admin/suport/delete/index/$1';


// ho tro
$route['admin/me-nu'] = 'admin/menu/index/$1';
$route['admin/me-nu/them'] = 'admin/menu/add/index/$1';
$route['admin/me-nu/sua/(:num)'] = 'admin/menu/edit/index/$1';
$route['admin/me-nu/xoa'] = 'admin/menu/delete/index/$1';


// bai viet
$route['admin/bai-viet'] = 'admin/content/index/$1';
$route['admin/bai-viet/(:num)'] = 'admin/content/index/$1';
$route['admin/bai-viet/them'] = 'admin/content/add/index/$1';
$route['admin/bai-viet/sua/(:num)'] = 'admin/content/edit/index/$1';
$route['admin/bai-viet/xoa'] = 'admin/content/delete/index/$1';

// ANH - Slider
$route['admin/anh-slider'] = 'admin/slider/index/$1';
$route['admin/anh-slide/(:num)'] = 'admin/slider/index/$1';
$route['admin/anh-slide/them'] = 'admin/slider/add/index/$1';
$route['admin/anh-slide/sua/(:num)'] = 'admin/slider/edit/index/$1';
$route['admin/anh-slide/xoa'] = 'admin/slider/delete/index/$1';


// FOTOER
$route['admin/c-footer'] = 'admin/cfooter/index/$1';
$route['admin/c-footer/them'] = 'admin/cfooter/add/index/$1';
$route['admin/c-footer/sua/(:num)'] = 'admin/cfooter/edit/index/$1';
$route['admin/c-footer/xoa'] = 'admin/cfooter/delete/index/$1';








/*---------------------------------ADMIN---------------------------------*/
$route['admin/dang-nhap'] = 'admin/ad_login/index/$1';
$route['admin/dang-xuat'] = 'admin/ad_login/logout/$1';
$route['admin/kiem-tra'] = 'admin/ad_login/VerifyLogin/index/$1';



$route['admin/admincp/(:num)'] = 'admin/admincp/index/$1';
$route['admin/admincp/'] = 'admin/products/index/$1';

$route['admin/content/(:num)'] = 'admin/content/index/$1';
$route['admin/content/'] = 'admin/content/index/$1';


$route['admin'] = "admin/suport";
$route['default_controller'] = "home";
$route['404_override'] = '';




/*---------------------------------FONT-END---------------------------------*/
$route['dieu-hoa-khong-khi'] = 'products/index/$1';
$route['dieu-hoa-khong-khi/(:num)'] = 'products/index/$1';
$route['dieu-hoa-khong-khi-t'] = 'products/index1/$1';
$route['dieu-hoa-khong-khi-t/(:num)'] = 'products/index1/$1';
$route['mua-hang'] = 'checkout/index/$1';

$route['(:any)-g-(:num)'] = "products/aprice/id/$2";
$route['(:any)-h-(:num)'] = "products/origin/id/$2";
$route['(:any)-t-(:num)'] = "products/brand/id/$2";
$route['(:any)-cx-(:num)'] = "products/capacity/id/$2";
$route['(:any)-c-(:num)'] = "products/category/id/$2";
$route['(:any)-p-(:num)'] = "products/deproduct/id/$2";

$route['(:any)-tn-(:num)'] = "products/features/id/$2";


$route['(:any)-dh-(:num)'] = "products/checkout/id/$2";
$route['(:any)-dv-(:num)'] = "contents/dichvu/id/$2";
$route['(:any)-ft-(:num)'] = "cfooter/cfooterview/id/$2";
$route['tin-tuc'] = 'news/index/$1';
$route['tin-tuc/(:num)'] = 'news/index/$1';
$route['(:any)-tt-(:num)'] = "news/detailview/id/$2";

$route['(:any)'] = "products/checkSlug/$1";
#$route['(:any)'] = "products/deproduct/id/$2";



/* End of file routes.php */
/* Location: ./application/config/routes.php */